const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
    transpileDependencies: true,
    devServer: {
         proxy: "http://localhost:4000" //如果后端在同一个计算机但是端口不同要添加这个
    },
    configureWebpack: {
        devtool: 'source-map',
        output: {
            devtoolModuleFilenameTemplate: info => {
                const resourcePath = info.resourcePath
                    .replace(/\\/g, '/')
                    .replace(/^\.\//, '');
                return `webpack:///${resourcePath}?${info.hash}`;
            }
        }
    }
})
